import App from './App'
// #ifndef VUE3
import Vue from 'vue'
// import interceptor from '@/interceptor.js'
import vBase from './vBase/index.js'

import uniList from 'uni_modules/uni-list/components/uni-list/uni-list.vue';
import uniListItem from 'uni_modules/uni-list/components/uni-list-item/uni-list-item.vue';
import uniDateformat from 'uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.vue';
import uniPopup from 'uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
import uniTransition from 'uni_modules/uni-transition/components/uni-transition/uni-transition.vue';
import uniTable from 'uni_modules/uni-table/components/uni-table/uni-table.vue';
import uniTd  from 'uni_modules/uni-table/components/uni-td/uni-td.vue';
import uniTr from 'uni_modules/uni-table/components/uni-tr/uni-tr.vue';
import uniTh from 'uni_modules/uni-table/components/uni-th/uni-th.vue';
import UniIcons from 'uni_modules/uni-icons/components/uni-icons/uni-icons.vue';

import UniDataSelect from 'uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue';
import UniSwipeAction from 'uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action.vue';
import UniSwipeActionItem from 'uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.vue';
import UniLoadMore from 'uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue'
// import UniEmptyInfo from 'uni_modules/uni-empty-info/components/uni-empty-info/uni-empty-info.vue';
import UniSearchBar from 'uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue';


Vue.component('UniIcons', UniIcons);
Vue.component('UniSearchBar', UniSearchBar);
Vue.component('UniDataSelect', UniDataSelect);
// Vue.component('UniEmptyInfo', UniEmptyInfo);
Vue.component('UniSwipeAction', UniSwipeAction);
Vue.component('UniSwipeActionItem', UniSwipeActionItem);
Vue.component('UniLoadMore', UniLoadMore);
Vue.component('uniTh', uniTh);
Vue.component('uniTd', uniTd);
Vue.component('uniTr', uniTr);
Vue.component('uni-table', uniTable);
Vue.component('uni-transition', uniTransition);
Vue.component('uni-popup', uniPopup);
Vue.component('uni-dateformat', uniDateformat);
Vue.component('uni-list', uniList);
Vue.component('uni-list-item', uniListItem);

Vue.use(vBase, {
    onLoginSuccess: function (e) {
        uni.reLaunch({
            url: "/pages/menu/menu"
        })
    },
    onLoginError: function () {
        uni.reLaunch({
            url: "/pages/login/login"
        })
    }
})
Vue.config.productionTip = false

App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif